
  
  
  <template>

     
    <header class='app-header'>
      <div class="container">
        <h1 class="logo">
          <RouterLink to="/">小兔鲜</RouterLink>
        </h1>
        <ul class="app-header-nav">
          <li class="home">
            <RouterLink to="/">首页</RouterLink>
          </li>
          <li>
            <RouterLink to="/">居家</RouterLink>
          </li>
          <li>
            <RouterLink to="/">美食</RouterLink>
          </li>
          <li>
            <RouterLink to="/">服饰</RouterLink>
          </li>
        </ul>
        <div class="search">
          <i class="iconfont icon-search"></i>
          <input type="text" placeholder="搜一搜">
        </div>
        <!-- 头部购物车 -->
      </div>
    </header>
  </template>
  
  <style scoped lang='scss'>
  .app-header {
    background: #fff;
    padding: 10px 0;
  
    .container {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
  
    .logo {
      width: 200px;
  
      a {
        display: block;
        height: 50px;
        width: 100%;
        text-indent: -9999px;
        background: url('@/assets/images/logo.png') no-repeat center 10px / contain;
      }
    }
  
    .app-header-nav {
      display: flex;
      gap: 20px;
  
      li {
        a {
          font-size: 16px;
          line-height: 32px;
          height: 32px;
          display: inline-block;
          color: #333;
          text-decoration: none;
  
          &:hover {
            color: #007bff;
            border-bottom: 2px solid #007bff;
          }
  
          &.active {
            color: #007bff;
            border-bottom: 2px solid #007bff;
          }
        }
      }
    }
  
    .search {
      display: flex;
      align-items: center;
      border-bottom: 1px solid #e7e7e7;
      padding: 5px;
  
      .icon-search {
        font-size: 20px;
        margin-right: 5px;
        color: #333;
      }
  
      input {
        flex: 1;
        height: 30px;
        border: none;
        outline: none;
      }
    }
  
    .cart {
      width: 50px;
  
      .curr {
        height: 32px;
        line-height: 32px;
        text-align: center;
        position: relative;
        display: block;
  
        .icon-cart {
          font-size: 22px;
        }
  
        em {
          font-style: normal;
          position: absolute;
          right: 0;
          top: 0;
          padding: 1px 6px;
          line-height: 1;
          background: #007bff;
          color: #fff;
          font-size: 12px;
          border-radius: 10px;
          font-family: Arial;
        }
      }
    }
  }
  </style>
  